package com.springboot.springbootweb.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author gwj
 * @since 2021-09-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("jc_user")
@AllArgsConstructor
@NoArgsConstructor
public class JcUser extends Model<JcUser> {

    private static final long serialVersionUID = 1L;

    private String id;

    private String name;

    private String password;

    private String email;

    private String isonline;

    private String img;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
